{extend name="web/public/base" /}
{block name="header"}
{/block}
{block name="main"}
<section class="scrollable padder">
    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <li><a><i class="fa fa-home"></i> 首页</a></li>
        <li class="active">会员管理</li>
        <li class="active">{$title}</li>
    </ul>

    <div class="row">
        <div class="col-sm-12">
            <section class="panel panel-default">
                <header class="panel-heading font-bold">基本信息</header>
                <div class="panel-body">
                    <a class="btn btn-primary" href="{:url('updateInfo',array('uid'=>$uinfo['uid']))}">修改资料</a>
                </div>
                <div class="panel-body">
                    <div class="row col-lg-12">
                        <div class="form-group col-sm-3">
                            <label>会员账号 :</label>
                            <span>{$uinfo.usernumber}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>会员姓名 :</label>
                            <span>{$uinfo.realname}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>注册时间 :</label>
                            <span>{$uinfo.active_time|date="Y-m-d H:i:s",###}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label> 邮箱:</label>
                            <span>{$uinfo.email|default="无"}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>手机号 :</label>
                            <span>{$uinfo.mobile}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>身份证号 :</label>
                            <span>{$uinfo.IDcard}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>开户银行 :</label>
                            <span>{$uinfo.bankname|default="无"}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>银行卡号 :</label>
                            <span>{$uinfo.banknumber|default="无"}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>开户行 :</label>
                            <span>{$uinfo.bank_address|default="无"}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>支付宝账号 :</label>
                            <span>{$uinfo.alipay|default="无"}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>微信账号:</label>
                            <span>{$uinfo.wechat|default="无"}</span>
                        </div>
                        <!--                        <div class="form-group col-sm-3">-->
                        <!--                            <label>密码 :</label>-->
                        <!--                            <span>{$uinfo.psd1}/{$uinfo.psd2}</span>-->
                        <!--                        </div>-->
                        <div class="form-group col-sm-3">
                            <label>推荐人 :</label>
                            <span>{$uinfo.tuijiannumber|default="公司"}</span>
                        </div>

                        <div class="form-group col-sm-3">
                            <label>会员身份 :</label>
                            <span>{$uinfo.level.name}</span>

                        </div>
                        <div class="form-group col-sm-3">
                            <label>联盟成长值 :</label>
                            <span>{$uinfo.achievement1}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>团队（总）成长值 :</label>
                            <span>{$uinfo.achievement2}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>团队（累计）成长值 :</label>
                            <span>{$uinfo.achievement}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>首次签到 :</label>
                            <span>{$uinfo.start_sign_time}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>最近签到 :</label>
                            <span>{$uinfo.end_sign_time}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>连续签到 :</label>
                            <span>{$uinfo.sign_days}天</span>
                        </div>

                    </div>
                </div>
            </section>

            <section class="panel panel-default">
                <header class="panel-heading font-bold">财务信息</header>

                <div class="panel-body">
                    <div class="row col-lg-12">
                        <div class="form-group col-sm-3">
                            <label>{$Think.const.HASACTIVE} :</label>
                            <span>{$uinfo.finance.hasactive}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>{$Think.const.HASTDB} :</label>
                            <span>{$uinfo.finance.hastdb}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>{$Think.const.HASWEALTH} :</label>
                            <span>{$uinfo.finance.haswealth}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label> {$Think.const.HASCP}:</label>
                            <span>{$uinfo.finance.hascp}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>{$Think.const.HASCP}释放额度 :</label>
                            <span>{$uinfo.finance.per_cp}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>{$Think.const.HASCONTRIBUTION} :</label>
                            <span>{$uinfo.finance.hascontribution}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>{$Think.const.HASCONTRIBUTION}释放额度 :</label>
                            <span>{$uinfo.finance.per_contribution}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>{$Think.const.HASZZT} :</label>
                            <span>{$uinfo.finance.haszzt}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>{$Think.const.HASGROWTH} :</label>
                            <span>{$uinfo.finance.hasgrowth}</span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>{$Think.const.HASGREEN} :</label>
                            <span>{$uinfo.finance.hasgreen}</span>
                        </div>

                    </div>
                </div>
            </section>

            <section class="panel panel-default">
                <header class="panel-heading font-bold">认证信息</header>
                <div class="panel-body">
                    {if $uinfo['status'] == 2}
                    <a class="btn btn-primary" href="javascript:;" onclick="auditing();return false;">认证审核</a>
                    {/if}
                </div>
                <div class="panel-body">
                    <div class="row col-lg-12">
                        <div class="form-group col-sm-3">
                            <label>身份证正面照 :</label>
                            <span><img src="{$uinfo.ID1}" alt="无" style="max-width: 200px"></span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>身份证反面照 :</label>
                            <span><img src="{$uinfo.ID2}" alt="无" style="max-width: 200px"></span>
                        </div>
                        <div class="form-group col-sm-3">
                            <label>打款截图 :</label>
                            <span><img src="{$uinfo.auth_icon}" alt="无" style="max-width: 200px"></span>
                        </div>

                    </div>
                </div>
            </section>
        </div>
    </div>
</section>
{/block}
{block name="footer"}
<script type="text/javascript">
    function auditing() {
        layer.confirm('审核结果？', {
            closeBtn: false,
            btn: ['同意', '拒绝', '取消'] //可以无限个按钮
        }, function (index, layero) {
            //按钮【按钮一】的回调
            getRet(1);
        }, function (index) {
            //按钮【按钮二】的回调
            getRet(2);
        }, function (index) {
            layer.close(index);
        });
    }

    function getRet(type) {
        // console.log(type);
        var uid = "{$uinfo.uid}";
        $.post("{:url('authAudit')}", {uid: uid, type: type}, function (data) {
            layer.msg(data.msg);
            if (data.code) {
                setTimeout(function () {
                    location.reload();
                }, 1000)
            }
            return false;
        }, 'json');
    }
</script>
{/block}
